package com.yhh.phone.service;

import com.yhh.common.base.ret.ApiResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 手机短信服务接口
 */
@Api(tags = "手机短信服务API")
@RestController
@RequestMapping("phone/api/v1")
public interface PhoneService {

    /**
     * 发送注册码
     * @param phoneNumber
     * @return
     */
    @ApiOperation(value = "发送短信注册验证码")
    @PostMapping("sendRegCode")
    ApiResult sendRegCode(@RequestParam("phoneNumber") String phoneNumber);

    /**
     * 验证手机注册码是否正确
     * @param phoneNumber
     * @param regCode
     * @return
     */
    @ApiOperation(value = "验证注册码是否正确")
    @PostMapping("verifyRegCode")
    ApiResult verifyRegCode(@RequestParam("phoneNumber") String phoneNumber,@RequestParam("regCode")String regCode);
}
